package com.hluck.mvvmlibrary;

import android.annotation.SuppressLint;
import android.app.Application;
import android.content.Context;

/**
 * @Author： LJH
 * @Time： 2023/12/22
 * @description：
 */
public class BaseApplication extends Application {

    private static ActivityManager activityManager;
    @SuppressLint("StaticFieldLeak")
    private static BaseApplication application;
    @SuppressLint("StaticFieldLeak")
    private static Context context;

    @Override
    public void onCreate() {
        super.onCreate();
        activityManager = new ActivityManager();
        context = getApplicationContext();
        application = this;
    }

    public static ActivityManager getActivityManager() {
        return activityManager;
    }

    public static Context getContext() {
        return context;
    }

    public static BaseApplication getApplication(){
        return application;
    }
}
